home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1997 December
/
MACPOWER-1997-12.ISO.7z
/
MACPOWER-1997-12.ISO
/
AMUG
/
PROGRAMMING
/
Raven 1.2.sit
/
Raven 1.2
/
Source
/
Foundation
/
Common
/
ZConstants.h
< prev
next >
Wrap
Text File
|
1997-08-23
|
8KB
|
234 lines
/*
* File: ZConstants.h
* Summary: Various constants.
* Written by: Jesse Jones
*
* Copyright ゥ 1996-1997 Jesse Jones.
* For conditions of distribution and use, see copyright notice in ZTypes.h
*
* Change History (most recent first):
*
* <6> 8/22/97 JDJ Added kShowInvalidationsCmd.
* <5> 6/15/97 JDJ Added kHelpCmd.
* <4> 8/15/97 JDJ Added kSaveAllCmd and kJunkAllCmd.
* <3> 8/15/97 JDJ Added constants for modifier keys.
* <2> 8/06/97 JDJ Removed kEmptyString, kEmptyPascalString, and kUnknownString.
* <1> 1/20/96 JDJ Created
*/
#pragma once
#include <ZTypes.h>
// ===================================================================================
// Misc Constants
// ===================================================================================
const bool kRedraw = true;
const bool kDontRedraw = false;
const bool kHandled = true;
const bool kNotHandled = false;
const bool kMoveHigh = true;
const bool kDontMoveHigh = false;
const bool kPurgeable = true;
const bool kNonPurgeable = false;
const bool kRecursive = true;
const bool kNonRecursive = false;
const bool kPersistant = true;
const bool kNonPersistant = false;
const bool kRaw = true;
const bool kCooked = false;
const short kDontZeroBytes = 0;
const short kZeroBytes = 1;
const short kUseAppHeap = 2;
const short kUseTempHeap = 4;
const Byte kNewFill = 0xD3; // Used for filling new and freed blocks.
const Byte kFreeFill = 0xF3;
const short kNoFileRefNum = -32767;
const short kNoResource = -1;
const short kFullJustification = 128; // This is currently only used by Raven's TextBox function (see ZQuickDrawUtils.h)
const bool kUseCase = true;
const bool kDontUseCase = false;
#if MAC
const bool kIsBigEndian = true;
#elif WIN
const bool kIsBigEndian = false;
#else
#pragma error can't set endian
#endif
// ===================================================================================
// Character and Key Codes
// ===================================================================================
// Navigation Keys
const char kLeftArrowChar = 0x1C;
const char kRightArrowChar = 0x1D;
const char kUpArrowChar = 0x1E;
const char kDownArrowChar = 0x1F;
const char kHomeChar = 0x01;
const char kEndChar = 0x04;
const char kPageUpChar = 0x0B;
const char kPageDownChar = 0x0C;
// Deletion Keys
const char kBackspaceChar = 0x08;
const char kFwdDeleteChar = 0x7F; // Only nonprinting above $20
const char kClearChar = 0x1B; // Same as Escape
const short kClearKey = 0x47;
// Action Keys
const char kEnterChar = 0x03;
const char kTabChar = 0x09;
const char kReturnChar = 0x0D;
const char kEscapeChar = 0x1B; // Same as Clear
const short kEscapeKey = 0x35;
// Special Keys
const char kHelpChar = 0x05;
const char kFunctionChar = 0x10; // All function keys F1 to F15
const short kF1Key = 0x7A; // Undo
const short kF2Key = 0x78; // Cut
const short kF3Key = 0x63; // Copy
const short kF4Key = 0x76; // Paste
const short kF5Key = 0x60;
const short kF6Key = 0x61;
const short kF7Key = 0x62;
const short kF8Key = 0x64;
const short kF9Key = 0x65;
const short kF10Key = 0x6D;
const short kF11Key = 0x67;
const short kF12Key = 0x6F;
const short kF13Key = 0x69; // Print Screen
const short kF14Key = 0x6B; // Scroll Lock
const short kF15Key = 0x71; // Pause
// Special Characters
const char kCommandChar = 0x11; // the cloverleaf symbol
const char kTildeChar = 0x7E;
const char kCheckMarkChar = 0x12;
const char kDiamondChar = 0x13;
const char kAppleLogoChar = 0x14;
const char kFirstPrintingChar = 0x20; // Nonprinting if less than
const char kSpaceChar = 0x20;
const char kPeriodChar = 0x2E; // For detecting Command-Period
// Modifier Keys
const short kLeftShiftKey = 0x38;
const short kRightShiftKey = 0x3C;
const short kOptionKey = 0x3A;
const short kCommandKey = 0x37;
const short kControlKey = 0x3B;
// ===================================================================================
// Messages
// Note that lower case messages are reserved for Raven.
// ===================================================================================
extern const string kNothingMessage;
extern const string kOKMessage;
extern const string kCancelMessage;
// ===================================================================================
// Commands
// Note that lower case commands are reserved for Raven.
// ===================================================================================
extern const MenuCommand kNothingCmd;
extern const MenuCommand kAbortCmd; // command-period
extern const MenuCommand kHelpCmd;
extern const MenuCommand kAboutCmd; // About Menu
extern const MenuCommand kDACmd;
extern const MenuCommand kNewCmd; // File Menu
extern const MenuCommand kOpenCmd;
extern const MenuCommand kCloseCmd;
extern const MenuCommand kCloseAllCmd;
extern const MenuCommand kJunkAllCmd;
extern const MenuCommand kSaveCmd;
extern const MenuCommand kSaveAllCmd;
extern const MenuCommand kSaveAsCmd;
extern const MenuCommand kRevertCmd;
extern const MenuCommand kPageSetupCmd;
extern const MenuCommand kPrintCmd;
extern const MenuCommand kPrintOneCmd;
extern const MenuCommand kQuitCmd;
extern const MenuCommand kSaveCopyAsCmd;
extern const MenuCommand kUndoCmd; // Edit Menu
extern const MenuCommand kRedoCmd;
extern const MenuCommand kCutCmd;
extern const MenuCommand kCopyCmd;
extern const MenuCommand kPasteCmd;
extern const MenuCommand kClearCmd;
extern const MenuCommand kSelectAllCmd;
extern const MenuCommand kShowClipboardCmd;
extern const MenuCommand kStackWindowCmd; // Window menu
extern const MenuCommand kTileWindowCmd;
extern const MenuCommand kNextWindowCmd;
extern const MenuCommand kFontMenuCmd; // Sub-menus
extern const MenuCommand kSizeMenuCmd;
extern const MenuCommand kStyleMenuCmd;
extern const MenuCommand kFontLargerCmd; // Size menu commands
extern const MenuCommand kFontSmallerCmd;
extern const MenuCommand kFontOtherCmd;
extern const MenuCommand kPlainCmd; // Style menu commands
extern const MenuCommand kBoldCmd;
extern const MenuCommand kItalicCmd;
extern const MenuCommand kUnderlineCmd;
extern const MenuCommand kOutlineCmd;
extern const MenuCommand kShadowCmd;
extern const MenuCommand kCondenseCmd;
extern const MenuCommand kExtendCmd;
extern const MenuCommand kJustifyDefaultCmd; // Text justification
extern const MenuCommand kJustifyLeftCmd;
extern const MenuCommand kJustifyCenterCmd;
extern const MenuCommand kJustifyRightCmd;
extern const MenuCommand kJustifyFullCmd;
#if DEBUG
extern const MenuCommand kTraceFlowCmd; // Debugging commands
extern const MenuCommand kUnitTestCmd;
extern const MenuCommand kMACSBUGCmd;
extern const MenuCommand kIntenseDebugCmd;
extern const MenuCommand kHeapCheckCmd;
extern const MenuCommand kASSERTCmd;
extern const MenuCommand kShowHeapCmd;
extern const MenuCommand kEatMemoryCmd;
extern const MenuCommand kPurgeMemoryCmd;
extern const MenuCommand kTRACEToSIOUXCmd;
extern const MenuCommand kTRACEToFileCmd;
extern const MenuCommand kTRACEAllToFileCmd;
extern const MenuCommand kMonkeyCmd;
extern const MenuCommand kDoEveryUnitTestCmd;
extern const MenuCommand kShowSIOUXCmd;
extern const MenuCommand kShowInvalidationsCmd;
extern const MenuCommand kFreeDeletedBlocksCmd;
extern const MenuCommand kDumpObjectHeapCmd;
#endif